package com.platform.common.core.domain.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.platform.common.core.annotation.Excel;
import com.platform.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 应用服务对象 dic_service_app
 *
 * @author xuefk
 * @date 2023-04-04
 */
public class DicServiceApp extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 应用id */
    private Long appId;

    /** 应用名称 */
    @Excel(name = "应用名称")
    @NotNull(message = "应用名称不能为空")
    private String appName;

    /** 应用编码 */
    @Excel(name = "应用编码")
    @NotNull(message = "应用编码不能为空")
    private String appCode;

    /** 应用logo */
    @Excel(name = "应用logo")
    private String appLogo;

    /** 应用负责人 */
    @Excel(name = "应用负责人")
    private String principal;

    /** 应用负责人联系电话 */
    @Excel(name = "应用负责人联系电话")
    private String principalTel;

    /** 平台给该应用颁发的唯一标识 */
    @Excel(name = "平台给该应用颁发的唯一标识")
    @NotNull(message = "唯一标识不能为空")
    private String clientId;

    /** 平台给该应用的密钥 */
    @Excel(name = "平台给该应用的密钥")
    @NotNull(message = "应用密钥不能为空")
    private String clientSecret;

    /** 有效期开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "有效期开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date datefrom;

    /** 有效期结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "有效期结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date dateend;

    /** 是否内置应用 0 否 1 是 */
    @Excel(name = "是否内置应用 0 否 1 是")
    private Integer isInternal;

    public void setAppId(Long appId)
    {
        this.appId = appId;
    }

    public Long getAppId()
    {
        return appId;
    }
    public void setAppName(String appName)
    {
        this.appName = appName;
    }

    public String getAppName()
    {
        return appName;
    }
    public void setAppCode(String appCode)
    {
        this.appCode = appCode;
    }

    public String getAppCode()
    {
        return appCode;
    }
    public void setAppLogo(String appLogo)
    {
        this.appLogo = appLogo;
    }

    public String getAppLogo()
    {
        return appLogo;
    }
    public void setPrincipal(String principal)
    {
        this.principal = principal;
    }

    public String getPrincipal()
    {
        return principal;
    }
    public void setPrincipalTel(String principalTel)
    {
        this.principalTel = principalTel;
    }

    public String getPrincipalTel()
    {
        return principalTel;
    }
    public void setClientId(String clientId)
    {
        this.clientId = clientId;
    }

    public String getClientId()
    {
        return clientId;
    }
    public void setClientSecret(String clientSecret)
    {
        this.clientSecret = clientSecret;
    }

    public String getClientSecret()
    {
        return clientSecret;
    }
    public void setDatefrom(Date datefrom)
    {
        this.datefrom = datefrom;
    }

    public Date getDatefrom()
    {
        return datefrom;
    }
    public void setDateend(Date dateend)
    {
        this.dateend = dateend;
    }

    public Date getDateend()
    {
        return dateend;
    }
    public void setIsInternal(Integer isInternal)
    {
        this.isInternal = isInternal;
    }

    public Integer getIsInternal()
    {
        return isInternal;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("appId", getAppId())
            .append("appName", getAppName())
            .append("appCode", getAppCode())
            .append("appLogo", getAppLogo())
            .append("remark", getRemark())
            .append("principal", getPrincipal())
            .append("principalTel", getPrincipalTel())
            .append("clientId", getClientId())
            .append("clientSecret", getClientSecret())
            .append("datefrom", getDatefrom())
            .append("dateend", getDateend())
            .append("isInternal", getIsInternal())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
